<!doctype html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <title>Test Core</title>
  <link rel="stylesheet" href="lib/mocha.css" />
  <script src="lib/mocha.min.js"></script>
  <script src="lib/assert.js"></script>
  <script src="lib/jquery-1.11.1.min.js"></script>
  <script src="../src/jquery.validator.js"></script>
  <script src="../local/en.js"></script>
</head>
<body>
  <div id="mocha"></div>

  <!-- common test -->
  <form id="form">
    <input type="text" name="field1" id="field1">
    <input type="text" name="field2" id="field2">
    <input type="text" name="field3" id="field3">
    <input type="text" name="field_novalidate" id="field_novalidate" novalidate>
    <input type="text" name="field_disabled" id="field_disabled" disabled>
    <input type="text" name="field_readonly" id="field_readonly" readonly>
    <input type="hidden" name="field_hidden" id="field_hidden">

    <textarea name="field_textarea" id="field_textarea"></textarea>

    <select name="field_select" id="field_select">
        <option value="">Please select ...</option>
        <option value="0">Zero</option>
        <option value="1">One</option>
        <option value="2">Two</option>
    </select>

    <div class="checkboxes">
        <input type="checkbox" name="category[]" value="0">
        <input type="checkbox" name="category[]" value="1">
        <input type="checkbox" name="category[]" value="2">
    </div>
    <div class="radioes">
        <input type="radio" name="gender" value="unknown">
        <input type="radio" name="gender" value="male">
        <input type="radio" name="gender" value="female">
    </div>
  </form>

  <!-- test DOM way -->
  <form id="dom_way">
    <input type="email" name="email" data-rule="required;email">
    <input type="password" name="password" data-rule="required">
    <button type="submit">Submit</button>
  </form>
  
  <!-- test JS way -->
  <form id="js_way">
    <input type="email" name="email">
    <input type="password" name="password">
    <button type="submit">Submit</button>
  </form>
    
  <script src="unit/core.js"></script>
  <script src="unit/rules.js"></script>
  <script>
    (window.mochaPhantomJS || mocha).run();
  </script>
</body>
</html>